﻿<%@ Page Title="Oportunidades" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Oportunidades.aspx.cs" Inherits="CursoUNICEUB.Oportunidades" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <h1>
        Lista de Oportunidades</h1>
    <hr />
    <asp:HyperLink ID="hylInserirOportunidade" runat="server" NavigateUrl="~/InserirOportunidade.aspx"
        Text="Inserir nova oportunidade" Visible="False" />
    <br />
    <br />
    <asp:Panel ID="Panel2" runat="server" CssClass="collapsePanelHeader" Height="30px">
        <div style="padding: 5px; cursor: pointer; vertical-align: middle;">
            <div style="float: left;">
                Filtrar as oportunidades...</div>
            <div style="float: left; margin-left: 20px;">
                <asp:Label ID="Label1" runat="server">(Mostrar Detalhes...)</asp:Label>
            </div>
            <div style="float: right; vertical-align: middle;">
                <asp:ImageButton ID="Image1" runat="server" ImageUrl="~/Img/expand_blue.jpg" AlternateText="(Mostrar Detalhes...)" />
            </div>
        </div>
    </asp:Panel>
    <asp:Panel ID="Panel1" runat="server" CssClass="collapsePanel" Height="0">
        <br />
        <table>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server">Busca : </asp:Label>
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtBusca" MaxLength="30" Width="150px" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server">Cargo : </asp:Label>
                </td>
                <td>
                    <asp:DropDownList runat="server" Width="275px" ID="ddlCargo" DataTextField="Descricao"
                        DataValueField="Codigo" />
                </td>
                 <td>
                        <asp:ImageButton ID="ImageButton1" runat="server" Height="25px" 
                        ImageUrl="~/Img/lupa.gif" onclick="ImageButton1_Click" Width="26px" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    <ajaxToolkit:CollapsiblePanelExtender ID="cpeDemo" runat="Server" TargetControlID="Panel1"
        ExpandControlID="Panel2" CollapseControlID="Panel2" Collapsed="True" TextLabelID="Label1"
        ImageControlID="Image1" ExpandedText="(Esconder detalhes...)" CollapsedText="(Mostrar detalhes...)"
        ExpandedImage="~/Img/collapse_blue.jpg" CollapsedImage="~/Img/expand_blue.jpg"
        SuppressPostBack="true" SkinID="CollapsiblePanelDemo" />
    <fieldset class="login">
        <legend>Oportunidades</legend>
        <asp:GridView ID="grvOportunidades" runat="server" CellPadding="4" ForeColor="#333333"
            GridLines="None" Width="650px" AutoGenerateColumns="False">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:TemplateField HeaderText="Nome da Empresa">
                    <ItemTemplate>
                        <%# getNomeEmpresa((GridViewRow)Container)%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DescricaoCargo" HeaderText="Cargo" />
                <asp:TemplateField HeaderText="Salário">
                    <ItemTemplate>
                        <%# getSalario((GridViewRow)Container)%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Selecione">
                    <ItemTemplate>
                        <asp:HyperLink NavigateUrl='<%#Eval("Url")%>' runat="server" Text="Visualizar" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
    </fieldset>
</asp:Content>
